﻿using System;
using System.Collections.Generic;
using System.Text;
using EnvDTE;

namespace TSVNAddin.Core
{
	public class ProjectItemsRecover
	{
		public virtual string[] GetItemPaths(Project project)
		{
			var paths = GetPaths(project.ProjectItems);

			return paths.ToArray();
		}

		private List<string> GetPaths(ProjectItems projectItems)
		{
			var paths = new List<string>();
			foreach (ProjectItem item in projectItems)
			{
				paths.Add(item.get_FileNames(0));
				paths.AddRange(GetPaths(item.ProjectItems));
			}
			return paths;
		}
	}
}
